#include "data_convert.h"

float uint32ToFloat(uint32_t i) {
	un_DtformConver_1 u;
	u.i = i;
	return u.f;
}
uint32_t floatToUint32(float f) {
	un_DtformConver_1 u;
	u.f = f;
	return u.i;
}
float uint16ToFloat(uint16_t *data) {
	un_DtformConver_2 dc;
	dc.us_Buf[0] = data[0];
	dc.us_Buf[1] = data[1];
	return dc.ul_Temp;

}
void floatToUint16(float value, uint16_t *data) {
	un_DtformConver_2 dc;
	dc.ul_Temp = value;
	data[0] = dc.us_Buf[0];
	data[1] = dc.us_Buf[1];

}
